{% extends "admin/base_site.html" %}
{% load i18n %}
{% load admin %}

{% block bodyclass %}dashboard{% endblock %}
{% block breadcrumbs %}{% endblock %}

{% block content %}
	<div id="content-main">	
	<p>{% trans 'Welcome to the administration section. Here you may control how your site functions.' %}</p>

	{% if app_list %}
		{% for app in app_list %}
			<div class="admin block {% cycle 'left' 'right' %}">
				<h2>{% get_app_label app %}</h2>
				<p>{% get_app_help app %}</p>
				<dl>
				{% for model in app.models %}
					{% if model.perms.add and model.perms.change %}
					<dt><a href="{{ model.admin_url }}" class="changelink">{{ model.name }}</a></li>
					<dd>{% get_model_help model %}<br /><a href="{{ model.admin_url }}" class="changelink">{% trans 'List' %}</a> | <a href="{{ model.admin_url }}add/" class="addlink">{% trans 'Add' %}</a></dd>
	            {% endif %}
	        {% endfor %}
	        	</dl>
	        </div>
	    {% endfor %}
	{% else %}
		<div class="admin block">
			<h2>{% trans "Permission denied" %}</h2>
			<p>{% trans "You don't have permission to edit anything." %}</p>
		</div>
	{% endif %}
	</div>
{% endblock %}

{% block sidebar %}
<div id="content-related">
    <div class="module" id="recent-actions-module">
        <h2>{% trans 'Recent Actions' %}</h2>
        <h3>{% trans 'My Actions' %}</h3>
            {% load log %}
            {% get_admin_log 10 as admin_log for_user user %}
            {% if not admin_log %}
            <p>{% trans 'None available' %}</p>
            {% else %}
            <ul class="actionlist">
            {% for entry in admin_log %}
            	{% if entry.content_type.name %}
            	<li class="{% if entry.is_addition %}addlink{% endif %}{% if entry.is_change %}changelink{% endif %}{% if entry.is_deletion %}deletelink{% endif %}">{% if not entry.is_deletion %}<a href="{{ entry.get_admin_url }}">{% endif %}{{ entry.object_repr|escape }}{% if not entry.is_deletion %}</a>{% endif %}<br /><span class="mini quiet">{% filter capfirst %}{% trans entry.content_type.name %}{% endfilter %}</span></li>
            	{% endif %}
            {% endfor %}
            </ul>
            {% endif %}
    </div>
</div>
{% endblock %}
